The present invention relates to a JAVA based simple network management protocol (SNMP) library (application programmer interface (API)) which is most preferably written fully in the JAVA software language. Such a library is useful for creating network management applications that can manage SNMP enabled devices. Such a system can be used to create JAVA based SNMP agents wherein the library takes care of all the SNMP details underneath whereby the user primarily focuses on the logic of the particular application.
Managing and monitoring connected devices is quite important, both for local area network applications and other interconnected environments. Several protocols are known which are designed to enable network management of network attached devices. These protocols often include a collection of objects and procedures for accessing the objects associated with a network attached device. Simple network management protocol (SNMP) is an example of a relatively well known protocol for managing and monitoring network devices.
Under SNMP, a network device has an object management system which includes an object database containing various objects relating to the network device, referred to as a management information base (MIB) and agent software for querying and modifying the objects, referred to as an agent. A system being managed under SNMP also includes a management station running manager software which provides centralized control of the various network devices by communicating with the agent software over the network. The software for management typically runs on a network attached computer and an interface is provided in the form of a graphical user interface. The management software obtains information about the objects in the MIBs of the various network attached devices and allows a user to monitor, query or modify the objects in the MIBs. To monitor, query or modify an object the manager software sends a request over the network to the object management system. Agent software for examining or otherwise performing operations on the object examines the request, and if valid, carries out the request and sends a message back to the manager software. If an agent determines that a request is invalid, for example the request is to write to an object which can only be read, the agent returns the message indicating an error.
In SNMP, the managers software typically obtains information about each network attached device""s object management system via a MIB output file. A MIB compiler generates the MIB output file from one or more MIB input files, each of which contains the name of each object in a MIB structure, and the plurality of attributes which describe the objects and the valid operations which can be performed on the objects. The MIB input file reflects the objects and attributes associated with the objects as they were intended to be implemented in the management system. The MIB compiler merges the one or more MIB input files and generates a MIB output file which contains the name of each object in the MIB and the plurality of attributes which describe the objects and the valid operations which can be performed on the objects.
A software product available from Advent Net provides an SNMP package which is an API or a library written fully in the JAVA software language. This helps a user create network management applications that can manage SNMP enabled devices. It can also be used to create JAVA based SNMP agents. The Advent Net SNMP package provides a library that is to take care of the SNMP details and provide a graphical interface such that the user can concentrate on the logic of the particular application.
Advent Net also provides a product Advent Net agent builder which is a tool for creating SNMP MIBs and instrumenting agents for the MIBs. The agent builder product provides what can be viewed as a SNMP to any gateway where the any stands for any back-end protocol. The back-end protocol could include for example file read and write operations, performing system commands, executing JAVA code and proxying to other SNMP agents.
The agent builder provides a graphical way to build SNMP agents. To each variable OID (object identifier) in the SNMP MIB, it is possible to associate an xe2x80x9cactionxe2x80x9d when a get or set operation is performed. The action may be to read or write a file, execute a system command, run JAVA code, or proxy the SNMP operation to some other agent. This is all defined graphically by choosing from a menu. The action is stored in the MIB file itself. The agent run time reads the MIB file and starts performing according to the actions that were defined at build-time.
The Advent Network Management, Inc. products currently provide the JAVA based SNMP library as noted above. However, this library is limited in functionality in that only single object identifiers (OIDs) can be retrieved and set via one SnmpRequest. This provides only limited capabilities. Unfortunately, the limits of the Advent library require a tremendous increase in network traffic to properly manage a network.
It is an object of the invention to provide an additional software library that allows the retrieval and setting of multiple SNMP variables in one request.
It is a further object of the invention to use the Advent SNMP library as a base and to provide further functionality, namely allowing the retrieval and setting of multiple SNMP variables in one request.
According to the invention, the problem of multiple variable retrievals and setting within one SnmpRequest has been solved.
According to the invention, a process or method is provided for providing multiple variable retrievals and setting within one SnmpRequest. The method forms packet data units with object identifiers (OIDs). The OIDs are packet specific for a particular request in an object management system using SNMP (simple network management protocol) attributes, the object management system including a plurality of objects and procedures for accessing the objects. The object management system is accessible over a network and associated with a network-attached device. The method includes providing the object management system with a plurality of classes providing descriptions of things that can be accessed. A SnmpSessions class establishing connection between the object management system and connected devices is also provided. Call back arguments are received at the network management station from the device. A SNMP application programmer interface (API) provides elements needed for connection. A SnmpRequest class is extended for extending the API to allow a plurality of objects to be sent or requested in a single packet data unit (PDU). The SNMP packet data unit (PDU) is formed comprised of one or more object identifiers (OIDs), the OIDs being packet specific for a particular request.
The process includes providing the Advent SNMP library as a base. The SnmpRequest Class is extended and the Advent SNMP.SNMP Client Class is implemented within the extended SnmpRequest Class. The authenticate (SNMP PDU, string) Advent SNMP client method is implemented. This method is used to validate the user authentication with an agent. The call-back (SnmpSession, SNMP PDU, Int) Advent SNMP client method is implemented. This is the method that will handle the response received. This method also handles cases of failures or miscommunications with an agent. The debug print (string) Advent client method is also implemented. This method is used to debug messages for the developer or enduser.
Within the extended SnmpRequest Class, the method of the invention provides following a sequence of steps to utilize the SnmpRequest Class. First the application programmer interface (API) (the library) is initialized by calling the INITAPI ( . . . ) method. The argument passed into this method is a reference to this class (e.g. the xe2x80x9cthisxe2x80x9d pointer is handed-in as the argument).
Next, after calling the INITAPI ( . . . ) method, the packet data unit (PDU) is initialized by calling the INITPDU ( ) method. This method does not require any argument.
Next an SNMP agent object is instantiated (created). This is accomplished by handing in the agent name, internet protocol (IP) address, and a community string to the SNMP agent constructor (namely the agent builder referred to in the introduction). It should be noted that the SNMP agent can be created at several points within the construction of the extended SnmpRequest Class but it must be completed before the next call to INIT session ( ). Next, the INIT session ( ) method should be called. This will allow communications between the network management station and the end device.
Once the above steps are complete, one can then create object identifier (OID) variables to send to the device. To accomplish this the AddVar methods are used to add one (1) or more variables to the PDU. Once the variables are added the packet data unit is sent to the device using the xe2x80x9cGET ( )xe2x80x9d xe2x80x9cGETNEXT ( )xe2x80x9d or xe2x80x9cSET ( )xe2x80x9d methods (depending upon the request type). When the packet returns or the system detects a communication failure, the xe2x80x9ccall-backxe2x80x9d method noted above would be called by the system and as noted above, the end user is responsible for how the response is handled.
According to another aspect of the invention, a software JAVA based SNMP library system is provided for use with a manager and connected devices. The system includes a plurality of classes providing descriptions of things that can be accessed. A SNMP application programmer interface (API) providing elements needed for connection is also provided. The system provides call-back arguments to be received at the manager from the devices. A SNMP packet data unit (PDU) comprised of one or more object identifiers (OIDs) is provided. The OIDs are packet specific for a particular request. The SnmpRequest class is provided for extending the API to allow a plurality of objects to be sent or requested in a PDU.
The system and method of the invention are based on the Advent SNMP library as a base and use this library. The Advent system is based on requesting one object identifier (OID) with the SnmpSession class with the GET function (for example to get information), the SET function (to set a certain attribute) and the GETNEXT function (to get information that is the next attribute associated with the referred to attribute). The system of the invention provides that the SnmpRequest Class implements the SnmpSession class and is associated with an SnmpSession Class. The SnmpSession Class is the device that will be communicated with for a request. The SnmpSession Class of the invention inherits (assumes the associated information) from the SnmpSession Class of the Advent system but also has a specialized extension which will be discussed further below.
The SnmpRequest Class of the invention provides GET, SET and GETNEXT functions as discussed above. However, the extension of the SnmpRequest Class extends the Advent library to provide GET and SET functions for one or more OIDs, thereby providing multiple variable retrievals and setting within one SnmpRequest. As this enhanced API (library) allows many objects to be sent or requested within the same PDU, network traffic is reduced considerably. As an example, a table of information may require 50 requests using the basic Advent package but the library according to the invention allows those 50 requests to be sent in one request thus reducing the network traffic. The SNMP library of the invention is implemented such that it is extensible and can be used as necessary by various different companies.
The various features of novelty which characterize the invention are pointed out with particularity in the claims annexed to and forming a part of this disclosure. For a better understanding of the invention, its operating advantages and specific objects attained by its uses, reference is made to the accompanying drawings and descriptive matter in which a preferred embodiment of the invention is illustrated.